<core-navbar-buttons slot="end" prepend>
    @if (searchEnabled) {
        <ion-button fill="clear" (click)="openSearch()" [ariaLabel]="'core.courses.searchcourses' | translate">
            <ion-icon name="fas-magnifying-glass" slot="icon-only" aria-hidden="true" />
        </ion-button>
    }
</core-navbar-buttons>
<ion-content>
    <ion-refresher slot="fixed" [disabled]="!loaded" (ionRefresh)="refreshDashboard($event.target)">
        <ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}" />
    </ion-refresher>

    <core-loading [hideUntil]="loaded" placeholderType="column" placeholderHeight="96px">
        @if (hasMainBlocks) {
            <ion-list class="list-item-limited-width">
                @for (block of blocks(); track block.instanceid) {
                    @if (block.visible) {
                        <core-block [block]="block" contextLevel="user" [instanceId]="userId" />
                    }
                }
            </ion-list>
        }

        @if (hasSideBlocks) {
            <core-block-side-blocks-button slot="fixed" contextLevel="user" [instanceId]="userId" />
        }

        @if (!hasMainBlocks) {
            <core-empty-box icon="fas-cubes" [message]="'core.course.nocontentavailable' | translate" />
        }
    </core-loading>
</ion-content>
